package com.leyou.item.mappers;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.item.entity.Sku;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.special.InsertListMapper;

/**
 * @Auther: xiang
 * @Date: 2019/8/20 19:59
 * @Description:
 */
public interface Skumapper extends BaseMapper<Sku>,InsertListMapper<Sku> {
    @Update("update tb_sku SET stock=stock-#{num} where id=#{id}")
    int minusStock(@Param("id")Long id,@Param("num")Integer num);
}
